/**
 * Created by huatan-sj on 14-11-26.
 */
function Mcategory(category,catid2){
	var op="";
	var st = "";
	$.ajax({
		type: 'get',
		url: '/index.php?c=business&a=getCateName',
		data: 'category=' +category,
		success: function (data) {
			var json_list =  eval('(' + data + ')');
			$("#category2").empty();
			if(json_list.list.length)
			{
				//alert(json_list.list[0]['cateid']);
				for(i=0;i<json_list.list.length;i++)
				{
					if(catid2>0){
						if(catid2== json_list.list[i]['cateid']){
							st=" selected "
						}
					}
					op+="<option value='"+json_list.list[i]['cateid']+"|"+json_list.list[i]['cateName']+"'  "+st+"  >"
						+json_list.list[i]['cateName']+"</option>";
				}
				$("#category2").append(op);
			}
		}
	});

}

function promotion(a){
	if(a==2){
		$("#isPromotionPrice").show();
	}
	else{
		$("#isPromotionPrice").hide();
	}
}